<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // let age = 18
        // document.write(`我今年${age}岁了`)
        // 1.弹出对话框
        let name = prompt('请输入名字：')
        let age = prompt('请输入年龄：')
        document.write(`大家好，我叫${name}，今年${age}岁了`)
    </script>
</body>
</html>